#统计字段数
import json
from collections import Counter

def count_numbers_in_json(filename):
    with open(filename, 'r') as file:
        data = json.load(file)
    numbers = [value for value in flatten(data) if isinstance(value, (int, float))]
    number_counts = Counter(numbers)
    total_count = sum(number_counts.values())
    return total_count

def flatten(data):
    if isinstance(data, dict):
        for value in data.values():
            yield from flatten(value)
    elif isinstance(data, list):
        for item in data:
            yield from flatten(item)
    else:
        yield data

filename = 'table_structure.json'
total_count = count_numbers_in_json(filename)
print(f"The total count of numbers in the JSON file is: {total_count}")
